package com.deram.ctin.serv.system.api.impl;

import com.deram.ctin.serv.system.api.SystemSearchApi;
import com.deram.ctin.serv.system.entity.SystemSearch;
import com.deram.ctin.serv.system.filter.SystemSearchFilter;
import com.deram.ctin.serv.system.service.SystemSearchService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * Created by xhw on 2017/09/13.
 */
@RestController
public class SystemSearchApiImpl implements SystemSearchApi {

    @Autowired
    private SystemSearchService systemSearchService;

    @Override
    public SystemSearch find(@RequestParam("id") Long id) {
        return systemSearchService.find(id);
    }

    @Override
    public List<SystemSearch> list(@RequestBody SystemSearchFilter filter) {
        return systemSearchService.list(filter);
    }
}
